#include <REGX52.H>
#include "Delay.h"
#include "MatrixLED.h"
unsigned char code Animation[] = {
	0x18,0x3B,0x24,0xFC,0xFC,0x22,0x1D,0x00,
	0x00,0x37,0x26,0xFC,0xFC,0x22,0x1D,0x00,
	0x00,0x33,0x24,0xFF,0xFF,0x22,0x1D,0x00,
	0x00,0x33,0x24,0xFC,0xFE,0x26,0x1D,0x00,
	0x00,0x33,0x24,0xFC,0xFC,0x22,0x1D,0x0C,
	0x00,0x33,0x24,0xFC,0xFE,0x26,0x1D,0x00,	
	0x00,0x33,0x24,0xFF,0xFF,0x22,0x1D,0x00,
	0x00,0x37,0x26,0xFC,0xFC,0x22,0x1D,0x00,
	0x18,0x3B,0x24,0xFC,0xFC,0x22,0x1D,0x00
};
void main()
{
	unsigned char i = 0, offset = 0, count = 0;
	MatrixLED_Init();
	while(1)
	{
		for(i = 0; i < 8; i++)
		{
			MatrixLED_ShowCol(i, Animation[i+offset]);
		}
		count++;
		if(count > 10)
		{
			count = 0;
			offset += 8;
			if(offset > 64)
			{
				offset = 0;
			}
		}
	}
}